import { ref } from 'vue'
import { createStore } from 'vuex'

export default createStore({
  state: {
    isNavBackShow: true,
    navTitle: '九耀 · 2022',
    isNavAboutShow: true,
    viewHeight: ref(0)
  },
  mutations: {
    changeNavBackIsShow (state) {
      state.isNavBackShow = true
    },
    changeNavAboutIsShow (state) {
      state.isNavAboutShow = true
    },
    changeNavBackIsClose (state) {
      state.isNavBackShow = false
    },
    changeNavAboutIsClose (state) {
      state.isNavAboutShow = false
    },
    changeNavTitleText (state, navTitle) {
      state.navTitle = navTitle
    },
    setViewHeightNum (state) {
      state.viewHeight = window.screen.height
    }
  },
  actions: {

  },
  modules: {
  }
})
